#ifndef _GAME_H_
#define _GAME_H_

#include "SDL.H"
#include "Sprite.h"
#include "Singleton.h"
#include <vector>

class GameState; // Make sure this class knows about the GameState class

class Game
{
	public:
		//Game(); // Remove public constructor
		~Game(); // Added public destructor

		void Init(const char* title, int width, int height, int bpp, bool fullscreen);
		void ChangeState(GameState* state);
		void PushState(GameState* state);
		void PopState();
		void HandleEvents();
		void Update();
		void Draw();
		void Clean();
		bool Running() {return m_bRunning;}
		void Quit() {m_bRunning = false;}
		SDL_Surface* GetScreen() {return m_pScreen;}

	private:
		Game() {} // Added private constructor
		friend class Singleton<Game>;

		// The stack of states
		std::vector<GameState*> states;

		bool m_bRunning;
		SDL_Surface* m_pScreen;
		bool m_bFullscreen;
};
typedef Singleton<Game> GameInst; // Typedef the game instance so you don't have to type all that whenever you want to use it

#endif